package com.killer.goods.controller;


import com.killer.common.entity.Result;
import com.killer.db.controller.BaseController;
import com.killer.goods.entity.Brand;
import com.killer.goods.service.IBrandService;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 品牌表 前端控制器
 * </p>
 *
 * @author killer
 * @since 2021-07-30
 */
@RestController
@RequestMapping("/brand")
public class BrandController extends BaseController<IBrandService, Brand> {

    @RequestMapping("/findByCategoryName")
    public Result<List<Brand>> findByCategoryName(@RequestParam("categoryName") String categoryName) {
        List<Brand> brands = baseService.findByCategoryName(categoryName);
        return Result.success(brands);
    }

}
